//index.js
//获取应用实例
const app = getApp()

//用来发送请求的接口
import { request } from "../../request/index";
const themColor = "#07c07b";
Page({
  data: {
    bannerList: [],
    swiper1: {
      auto: true,
      interval: 5000,
      indicatorDots: true,
      indicatorActiveColor: themColor
    }
  },
  onLoad: function () {
    let that = this;
    this.getBannerList();
    this.getCateList();
  },
  // 获取bannerlist
  getBannerList(){
    request({
      url: 'banner/list',     
    }).then(
       (res) => {
        console.log(res.data.data);
        this.setData({
          bannerList: res.data.data
        });

      }
    )
  },
  //

  getCateList(){
    request({
      url:'shop/goods/category/all'
    }).then((res)=>{
      console.log(res)
    })
  }


// 分类  /{domain}/shop/goods/category/all
})
